package com.shan;

/**
 * @Author: ShanYuqing
 * @Version: v1.0
 */
public class ArraySum {
    public static void main(String[] args) {
     getSum();
    }
    /*
            需求：有这样一个数组，元素是{68,27,95,88,171,996,51,210};
            求出该数组要求的元素和
            要求是：求和的元素十位，个位都不能是7，并且只能是偶数
     */
    public static void getSum(){
        int[] arr ={68,27,95,88,171,996,51,210};
        int sum = 0;
        for (int i = 0; i < arr.length; i++) {
            if(arr[i]%10!=7 && arr[i]/10%10!=7 && arr[i]%2==0){
                sum+=arr[i];
            }
        }
        System.out.println(sum);
    }
}
